package com.wushi.lenovo.asia5b.app_model.good.goodbean;

import android.text.TextUtils;

/**
 * Created by zhangyuncai on 2020/3/14.
 */
public class ParcelGoodsBean extends GoodsModelIml {
    private int id;
    private int product_id;
    private String name;
    private String image;
    private String option;//"20509:28315,1627207:3232481",
    private String price;//带单位的单价
    private String total;//带单位的总价
    private String domestic_fee_format;//带单位中国物流价格
    private int quantity;
    private String weight;//不带单位的总重量
    private String is_sensitive;//Not sensitive = 0, Is sensitive = 1
    private String attr_name;
    private String dimension_weight;//不带单位的体积重
    private String m3_weight;//不带单位的体积
    private String storage_day_num;//存储天数
    private int storage_total_days;//存储总共天数
    private String remark;//备注
    private String total_plus_domestic;//包裹详情总计价格
    private String diff_total;//总的差价

    @Override
    public String getStorage_day_num() {
        return storage_day_num;
    }

    public int getStorage_total_days() {
        return storage_total_days;
    }

    @Override
    public String goodsName() {
        return name;
    }

    @Override
    public int goodsId() {
        return product_id;
    }

    @Override
    public String goodsImg() {
        return image;
    }

    @Override
    public int parcelno() {
        return id;
    }

    @Override
    public String goodsAttr() {
        return attr_name;
    }

    @Override
    public String goodsUnitPrice() {
        return containsRM(price);
    }

    @Override
    public String goodsTotalPrice() {
        return containsRM(total);
    }

    @Override
    public int goodsQuantity() {
        return quantity;
    }

    @Override
    public boolean isMingan() {
        return TextUtils.equals(is_sensitive, "1");
    }

    @Override
    public String chinaDeliveryFee() {
        return containsRM(domestic_fee_format);
    }

    @Override
    public String totalDiffPrice() {
        if (!TextUtils.isEmpty(diff_total)) {
            return containsRM(diff_total);
        }
        return null;
    }

    @Override
    public String zongjiPrice() {
        return containsRM(total_plus_domestic);
    }

    @Override
    public String goodsTotalWeight() {
        return containsKG(weight);
    }

    @Override
    public String goodsTotalVolWeight() {
        return containsRM(dimension_weight);
    }

    @Override
    public String goodsTotalM3Weight() {
        return String.format("%s M³", m3_weight);
    }

    @Override
    public String getRemark() {
        return remark;
    }
}
